<template>
  <div class="bg-white my-[10px]">
    <BaseHead style="border-bottom: 0">衍生成果记录</BaseHead>
    <el-table :data="detailData.allAchievementVOList" class="w-full" border stripe>
      <el-table-column prop="name" label="名称" />
      <el-table-column prop="authorNameList" label="所有作者" />
      <el-table-column prop="productDate" label="成果日期" />
      <el-table-column label="成果类型">
        <template #default="{ row }">
          <CommonLabel :dataList="productTypeList" :value="row.productType" />
        </template>
      </el-table-column>
      <el-table-column label="审核状态">
        <template #default="{ row }">
          <CommonLabel
            :dataList="checkStatusList"
            valueKey="dictValue"
            labelKey="dictLabel"
            :value="row.checkstatus"
          />
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>
import BaseHead from "@/views/project/components/BaseHead.vue";
import CommonLabel from "@/views/project/components/CommonLabel.vue";
import { achievementDetail } from "@/api/project/zx/lxxm";
import useCommonFetch from "@/hooks/useCommonFetch";
const productTypeList = useCommonFetch("成果类型");
const checkStatusList = inject("checkStatusList");
const operateId = inject("id");
const detailData = ref({});
//获取信息详情
const getDetail = async () => {
  try {
    const res = await achievementDetail(operateId.value);
    detailData.value = res.data;
  } catch (error) {
    console.log(error);
  }
};
onMounted(() => {
  getDetail();
});
</script>

<style scoped lang="scss"></style>
